package com.pengji.rcp.plugin.perspective;

import org.eclipse.ui.*;

import com.pengji.rcp.plugin.PluginId;

public class Perspective implements IPerspectiveFactory {
	
	@Override
	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		
		layout.addStandaloneView(PluginId.NAVIGATION_VIEW_ID,  false, IPageLayout.LEFT, 0.2f, editorArea);
		IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
		folder.addPlaceholder(PluginId.VIEW_ID + ":*");
		folder.addView(PluginId.VIEW_ID);
		
		layout.getViewLayout(PluginId.NAVIGATION_VIEW_ID).setCloseable(false);
	}
}
